package main

import "fmt"

func main() {
	getSum(1, 2, 3, 4, 6, 7, 89, 6, 5)
}

func getSum(num ...int) {
	sum := 0
	for i := 0; i < len(num); i++ {
		fmt.Println(num[i])
		sum += num[i]
	}
	fmt.Println(sum)
}
